<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/common/taglibs.jsp"%>
<!DOCTYPE html>
<html class="ng-app:myApp" id="ng-app" ng-app="myApp" xmlns:ng="http://angularjs.org">
<head>
<title>高级调度</title>
<%@ include file="/WEB-INF/common/meta.jsp"%>
<%@ include file="/WEB-INF/layouts/global_res_header.jsp"%>
<link href="${ctx}/res_oms/tempShipment.css" type="text/css" rel="stylesheet" />
</head>
<body ng-controller="tempShipmentCtrl">
	<div id="container">
		<div id="left">
			<div id="lefttop">
				<div id="style">
					配载列表
				</div>
				<div id="style1">
        			<label>业务类型</label>
        			<select name="vocationType" id="c">
						<option style="display: none"></option>
						<option value="NORMAL">正常配送</option>
						<option value="SPLIT">短驳运输</option>
						<option value="SWITCH">转仓运输</option>
					</select>
				</div>
			</div>
			<div id="leftmiddle">
				<div id="style2">
					<ul id="tree">
					</ul>
				</div>
			</div>
			<div id="leftfooter">
				<div id="style3">
					<div id="o">&nbsp;订单数
						<span style="text-align: center;display: block;">0</span>
					</div>
					<div id="j">&nbsp;&nbsp;&nbsp;件数(件)
						<span style="text-align: center;display: block;">0</span>	
					</div>
					<div id="w">&nbsp;&nbsp;&nbsp;重量(KG)
						<span style="text-align: center;display: block;">0</span>	
					</div>
					<div id="v">&nbsp;&nbsp;&nbsp;体积(方)
						<span style="text-align: center;display: block;">0</span>			
					</div>
					<div id="p">&nbsp;&nbsp;&nbsp;托数
						<span style="text-align: center;display: block;">0</span>
					</div>
				</div>
				<div id="style4">	
				<div class="style">
        			<div><img src="${ctx}/res_oms/theme-b/imgs/e01.gif"/><span style="margin-left: 55px;margin-right: 40px;">待配载</span></div>
        			<div style="margin-left: 25px;"><img src="${ctx}/res_oms/theme-b/imgs/e03.gif"><span style="margin-left:55px">已配载</span></div>
        		</div>
        		<div class="style">
        			<div><img src="${ctx}/res_oms/theme-b/imgs/e02.gif"/><span style="margin-left: 45px;margin-right: 25px;">指定承运商</span></div>
        			<div style="margin-left: 25px;"><img src="${ctx}/res_oms/theme-b/imgs/e04.gif"><span style="margin-left: 50px;">指定车辆</span></div>
        		</div>				
				</div>
			</div>
		</div>
			<div id="right">
			<div id="righttop">
			<span style="display: none" class='id'></span>	配载号：<span class="p"></span> 单数：<span class="o">0</span> 送货点：<span class="s">0</span> 箱数：<span class="c">0</span> 件数：<span class="j">0</span> 重量：<span class="w">0</span> 体积：<span class="v">0</span> 托数：<span class="t">0</span>
			</div>
			<div id="rightmiddle">
				<form name="queryFormForm" class="form-inline" role="form">
						<div class="form-group top" style="margin-left: 12px">
						<label for="clientId">客户</label>
						<input name="clientId" class="form-control" placeholder="客户" style="width:130px;">
						<span class="glyphicon glyphicon-search" ng-click="onOpenEditFormModalC()"></span>
						</div>
						<div class="form-group top" style="margin-left: 12px;">
						<label for="orderCd">订单号</label>
						<input name="orderCd" ng-model="queryForm.orderCd" class="form-control" placeholder="订单号" style="width:130px;">
						</div>
						<div class="form-group top" style="margin-left: 35px">
						<label for="shipment_method">运输方式</label> <select
						name=shipment_method " ui-select2="{width:'130px', allowClear:'true'}"
						ng-model="queryForm.shipment_method" class="select2"
						data-placeholder="运输方式">
						<option value=""></option>
						<option value=""></option>
						<option ng-repeat="shipmentMethod in shipment_methodList" value="{{shipmentMethod.descr}}">{{shipmentMethod.val}}</option>
						</select>
						</div>
						<div class="form-group top" style="margin-left: 48px">
						<label for="cityId">城市</label>
						<input  name="cityId" class="form-control" placeholder="城市" style="width:130px;">
						<span class="glyphicon glyphicon-search" ng-click="onOpenEditFormModalCt()"></span>
						</div>
						<div class="form-group top" style="margin-left: 12px;">
						<label for="toAddr">地址</label> <input 
						name="toAddr" ng-model="queryForm.toAddr" class="form-control"
						placeholder="地址" style="width:130px;">
						</div>
						<div class="form-group" style="margin-left: 12px;">
						<label for="boci">波次</label> <input 
						name="" ng-model="queryForm.boci" class="form-control"
						placeholder="波次" style="width:130px;">
						</div>
						<div class="form-group" style="margin-left: 15px;">
						<label for="orderDt">开单日期</label> <input 
						name="orderDt" ng-model="queryForm.orderDt" class="form-control"
						placeholder="开单日期" style="width:130px;">
						</div>
						<div class="form-group" style="margin-left: 12px;">
						<label for="planaDate">预计到达时间</label> <input 
						name="planaDate" ng-model="queryForm.planaDate" class="form-control"
						placeholder="预计到达时间" style="width:130px;">
						</div>
						<div class="form-group top" style="margin-left: 24px;margin-right: 32px;">
						<label for="orderCd1">批量单号</label>
						<textarea style="width: 227px;height: 40px"  name="orderCd1" ng-model="queryForm.orderCd1" class="form-control"></textarea>
						</div>
						<button ng-click="onFilter()" ng-disabled="queryFormForm.$invalid" class="btn btn-default">查询</button>
					</form> 
			</div>
			<div id="rightfooter">
				<div id="mainDataBlocks" ng-grid="gridOptions"></div>
			</div>
		</div>
	</div>
</body>
<div id="editFormModal" class="modal" tabindex="-1" data-width="800px">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
		<h4 class="modal-title">创建配载</h4>
	</div>
	<div class="modal-body">
		<div class="row">
			<div class="col-md-12">
				<form name="editFormForm1" role="form" novalidate>
					<input type="hidden" name="id" ng-model="editForm.id"
						class="form-control">
					<div class="row">							
						<div class="col-sm-4">							
							&nbsp;&nbsp;&nbsp;&nbsp;<span class="spancss">*</span>承运商： <select name="constractorId" id="e" ng-required="true" ng-disabled="flagC" ui-select2="{width:'150px', allowClear:'true'}" ng-model="editForm.constractorId" class="select2" data-placeholder="服务产品">
								<option value=""></option>
								<option ng-repeat="constractor in constractorList" value="{{constractor.id}}">{{constractor.shortName}}</option>
							</select>
						</div>
						<div class="col-sm-4">						
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="spancss">*</span>运输方式： <select name="shipment_method" ng-required="true" ui-select2="{width:'150px', allowClear:'true'}" ng-model="editForm.shipment_method" class="select2" data-placeholder="运输方式">
								<option value=""></option>
								<option ng-repeat="shipment_method in shipment_methodList" value="{{shipment_method.descr}}">{{shipment_method.val}}</option>
							</select>
						</div>	
						<input type="hidden" name="code" ng-model="editForm.code"
						class="form-control">		
					</div>
					<div class="row top">
							<div class="col-sm-4">							
							<span class="spancss">*</span>车辆编号： <select name="vehicleId" id="vh" ng-required="true" ui-select2="{width:'150px', allowClear:'true'}" ng-model="editForm.vehicleId" class="select2" data-placeholder="车辆编号">
								<option value=""></option>
								<option ng-repeat="vehicle in vehicleList" value="{{vehicle.id}}">{{vehicle.cd}}</option>
							</select>
						</div>
						<div class="col-sm-4">						
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;车牌号： <input name="vehicleNo" ng-model="editForm.vehicleNo" class="form-control" placeholder="车牌号" disabled="disabled">
						</div>
						<div class="col-sm-4">					
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;车型： <select name="vehicleTypeId" ui-select2="{width:'150px', allowClear:'true'}" ng-model="editForm.vehicleTypeId" class="select2" data-placeholder="车型" disabled="disabled">
								<option value=""></option>
								<option value=""></option>
								<option ng-repeat="vehicleType in vehicleTypeList" value="{{vehicleType.id}}">{{vehicleType.name}}</option>
							</select>
						</div>
					</div>
					<div class="row top">
						<div class="col-sm-4">							
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;司机： <select name="driverId" ui-select2="{width:'150px', allowClear:'true'}" ng-model="editForm.driverId" margin-top: 5px" class="select2" data-placeholder="司机">
								<option value=""></option>
								<option value=""></option>
								<option ng-repeat="driver in driverList" value="{{driver.id}}">{{driver.name}}</option>
							</select>
						</div>													
						
						<div class="col-sm-4">							
							计划出发时间： <input name="planlDt" ng-model="editForm.planlDt" class="form-control" placeholder="计划出发时间" id="planlDt">
						</div>
						<div class="col-sm-4">							
							预计到达时间： <input name="planaDt" ng-model="editForm.planaDt" class="form-control" placeholder="预计到达时间" id="planaDt">
						</div>						
					</div>
					<div class="row top">
						<div class="col-sm-4">		
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;一口价： <input name="expense" ng-model="editForm.expense" class="form-control" placeholder="一口价">
						</div>
						<div class="col-sm-4">							
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;预计费用： <input name="expectMoney" ng-model="editForm.expectMoney" class="form-control" placeholder="预计费用">
						</div>
						<div class="col-sm-4">					
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;描述： <input name="descr" ng-model="editForm.descr" class="form-control" placeholder="描述">
						</div>					
					</div>					
				</form>
			</div>
		</div>
	</div>
	<div class="modal-footer">
		<button type="button" data-dismiss="modal" class="btn btn-default">关闭</button>
		<button ng-click="onSaveEditForm()" ng-disabled="editFormForm.$invalid" class="btn btn-default">提交</button>
	</div>
</div>

<div id="editFormModalC" class="modal" tabindex="-1" data-width="500"style="display: none;">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true" id="cl">×</button>
		<h4 class="modal-title">客户管理</h4>
	</div>
		<div style="height: 40px">
			<form name="queryFormFormc" class="form-inline" role="form">	
					<div class="form-group top">
						<label for="cd">客户代码</label>
						<input name="cd" ng-model="queryFormc.cd" class="form-control" placeholder="客户代码" style="width:150px;">
					</div>	
					<div class="form-group top" style="margin-left: 12px;">
						<label for="shortName">客户简称</label>
						 <input name="shortName" ng-model="queryFormc.shortName" class="form-control" placeholder="客户简称" style="width:150px;">
					</div>		
					<button ng-click="onQueryc()" ng-disabled="queryFormFormc.$invalid" class="btn btn-default">查询</button>			
			</form>			
		</div>
		<div id="mainDataC" ng-grid="gridOptionc" style="width: 495px;height: 250px"></div>
		<div style="height: 100px;overflow: auto;" id="s">
		一下为选中列表：
		           <table  id="table" style="font-size:12px;width: 490px;" border="1">      
		           	 <tbody id="tr">
		                         
		             </tbody>
		        	</table>
		</div>
	<div class="modal-footer">
		<button type="button" ng-click="addClient()" class="btn btn-default">添加</button>
		<button type="button" data-dismiss="modal" class="btn btn-default">关闭</button>
	</div>
</div>

<div id="editFormModalCt" class="modal" tabindex="-1" data-width="500"style="display: none;">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
		<h4 class="modal-title">城市管理</h4>
	</div>
		<div style="height: 40px">
			<form name="queryFormFormct" class="form-inline" role="form">	
					<div class="form-group top">
						<label for="clientId">代码</label>
						<input name="cd" ng-model="queryFormct.cd" class="form-control" placeholder="代码" style="width:150px;">
					</div>	
					<div class="form-group top" style="margin-left: 12px;">
						<label for="name">名称</label>
						 <input name="name" ng-model="queryFormct.name" class="form-control" placeholder="名称" style="width:150px;">
					</div>		
					<button ng-click="onQueryct()" ng-disabled="queryFormFormct.$invalid" class="btn btn-default">查询</button>			
			</form>			
		</div>
		<div id="mainDataCt" ng-grid="gridOptionct" style="width: 495px;height: 250px"></div>
</div>

<div class="contextMenu" id="menu">
	<ul>
		<li id="open" ng-click="onQuery()">
		 <img src=""/> 
		&nbsp;打开&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
		<li id="edit" ng-click="onOpenEditFormModal('add')">
		 <img src=""/> 
		&nbsp;创建配载&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
		<li id="cancel" ng-click="cancel()">
		 <img src=""/> 
		&nbsp;取消配载&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
		<li id="confirm" ng-click="confirmp()">
		 <img src=""/> 
		&nbsp;确定配载&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
		<li id="bcpz" ng-click="bczdpz()">
		 <img src=""/> 
		&nbsp;同波次自动配载&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
		<li id="pc" ng-click="bczdpc()">
		 <img src=""/> 
		&nbsp;按配载号自动配车&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
		<li id="zjdd" ng-click="zjdd()">
		 <img src=""/> 
		&nbsp;增加订单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
		<li id="qxdd" ng-click="qxdd()">
		 <img src=""/> 
		&nbsp;取消调度&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
	</ul>
</div>
<%@ include file="/WEB-INF/layouts/global_res_footer.jsp"%>
<script type="text/javascript" src="${ctx}/res_oms/oms/tempShipment.js"></script>
<script type="text/javascript" src="${ctx}/res_oms/jquery.contextmenu.r2.js"></script>
<script type="text/javascript">
	$(function(){
		var windowHeight = $(window).height();
		$("#container").height(windowHeight-15);
		$("#style1 select").height(20);
		var width=$("#container").width()-300;
		$("#right").width(width);
		$("#leftmiddle").height(windowHeight-167);
		$("#mainDataBlocks .ngViewport").width(width);
		$("#mainDataBlocks .ngFooterPanel").width(width);
		$("#mainDataBlocks .ngHeaderContainer").width(width);
		$("#mainDataBlocks .ngTopPanel").width(width);
	});
	
</script>


</html>
